void DrawNetQvsPt()


{

    //FileData = new TFile("MergedOutput.root");
    FileData = new TFile("./Pythia/MergedOutput.root");
    //TList *ListData = FileData->Get("outputPhi64");

    TList *ListData = FileData->Get("MCtrueOutputPhi256");


//    FileMC = new TFile("OutputPythia.root");
//    TList *ListMC = FileMC->Get("MCtrue");


    TH1F* PtPlus = (TH1F*) ListData->FindObject(Form("fPtPlus"));
    TH1F* PtMinus = (TH1F*) ListData->FindObject(Form("fPtMinus"));
    TH1F* NetQPt = new TH1F("fPtNetQ", "NetQ Vs Pt before EtaPtCuts", 1000, 0, 10 );

    TH1F* EtaPlus = (TH1F*) ListData->FindObject(Form("fEtaPlus"));
    TH1F* EtaMinus = (TH1F*) ListData->FindObject(Form("fEtaMinus"));
    TH1F* NetQEta = new TH1F("fEtaNetQ"," NetQ Vs Eta before EtaPtCuts", 400, -2, 2);

    TH1F* PtPlusAfterCuts = (TH1F*) ListData->FindObject(Form("fPtPlusAfterCuts"));
    TH1F* PtMinusAfterCuts = (TH1F*) ListData->FindObject(Form("fPtMinusAfterCuts"));
    TH1F* NetQPtAfterCuts = new TH1F("","NetQ vs Pt after EtaPtCuts",600,0,6);

    TH1F* EtaPlusAfterCuts = (TH1F*) ListData->FindObject(Form("fEtaPlusAfterCuts"));
    TH1F* EtaMinusAfterCuts = (TH1F*) ListData->FindObject(Form("fEtaMinusAfterCuts"));
    TH1F* NetQEtaAfterCuts = new TH1F("fEtaNetQ"," NetQ Vs Eta after EtaPtCuts", 400, -2, 2);

//    TH2F* EtaPtPlusAfterCuts = (TH2F*) ListData->FindObject(Form("ffEtaPtPlusAfterCuts"));
//    TH2F* EtaPtMinusAfterCuts = (TH2F*) ListData->FindObject(Form("ffEtaPtMinusAfterCuts"));
//    TH2F* NetQEtaPtAftersCuts = new TH2F("", "NetQ Vs Eta and Pt after all cuts", 200, -1, 1, 600, 0, 6);

    for (Int_t i=1;i<=PtPlus->GetNbinsX();i++)
    {
        NetQPt->SetBinContent(i, PtPlus->GetBinContent(i)-PtMinus->GetBinContent(i));
    }

    for (Int_t i=1;i<=PtPlusAfterCuts->GetNbinsX() ;i++)
    {
        NetQPtAfterCuts->SetBinContent(i, PtPlusAfterCuts->GetBinContent(i)-PtMinusAfterCuts->GetBinContent(i));
    }

    for (Int_t i=1;i<=EtaPlus->GetNbinsX() ;i++)
    {
        NetQEta->SetBinContent(i, EtaPlus->GetBinContent(i)-EtaMinus->GetBinContent(i));
        NetQEtaAfterCuts->SetBinContent(i, EtaPlusAfterCuts->GetBinContent(i)-EtaMinusAfterCuts->GetBinContent(i));
    }

    TCanvas *c1 = new TCanvas("c1","NNabs corr coeff vs width of Eta window",50,50,800,500);
    c1->Divide(2,2,0.001,0.001);
    c1->cd(1);
    NetQPt->Draw();
    c1->cd(2);
    NetQEta->Draw();
    c1->cd(3);
    NetQPtAfterCuts->Draw();
    c1->cd(4);
    NetQEtaAfterCuts->Draw();


}
